home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 44
/
Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso
/
-in_the_mag-
/
basics
/
amos
/
maxsamosdoors.lha
/
rs.amos
/
rs.amosSourceCode
Wrap
AMOS Source Code
|
1999-01-01
|
1KB
|
81 lines
F= Extension_16_0006(Val(Command Line$))
Set Input 10,-1
Dim A$(20)
Dim F$(20)
Global F$()
Global F
Rem *********** read cfg *************
Open In 1,"doors:rs/rs.cfg"
A=1
Repeat
If Not Eof(1) Then Line Input #1,A$(A)
If Not Eof(1) Then Line Input #1,F$(A)
A=A+1
Until Eof(1)
Close 1
If F$(A-1)="" Then A=A-1
TTAL=A
10 Rem ********** main routine ***********
X= Extension_16_002A(Chr$(27)+"[2J"+Chr$(27)+"[0;0H")
If X=20 Then Goto 5000
Rem ************ print options ***********
For A=1 To TTAL
If A$(A)<>"" Then X= Extension_16_002A(Str$(A)+" "+A$(A)+Chr$(10))
If X=20 Then Goto 5000
Next A
X= Extension_16_002A(Chr$(10)+" Q - Quit"+Chr$(10)+Chr$(10))
If X=20 Then Goto 5000
Rem ************ get input ***************
R$=Space$(69)
Z= Extension_16_0082("Read which file : ",R$)
If Z<>6 Then Goto 5000
N=Instr(R$,Chr$(0))
If N=0 Then N=69
If N>70 Then N=70
R$=Left$(R$,N-1)
Rem ************ handle quit options **************
If R$="" Then Goto 5000
If R$="q" Then Goto 5000
If R$="Q" Then Goto 5000
Rem *********** determine if valid file to display ***************
F=Val(R$)
If F>0 and F<=TTAL Then _SHOW[F]
Goto 10
BYE:
5000 Rem *************** end ****************
Extension_16_0018
End
Procedure _SHOW[F]
X= Extension_16_002A(Chr$(27)+"[2J"+Chr$(27)+"[0;0H")
If X=20 Then BYE
If Exist(F$(F)) Then A= Extension_16_00D0(F$(F))
If A=20 Then BYE
End Proc
Procedure BYE
Extension_16_0018
End
End Proc